# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Maintainer: Jan "heftig" Steffens <jan.steffens@gmail.com>
# Contributor: sda <sda00@himki.net>

pkgname=igmpproxy
pkgver=0.4
pkgrel=1
pkgdesc="a simple multicast router for Linux only using the IGMP protocol"
arch=(loong64 x86_64)
url="https://github.com/pali/igmpproxy"
license=('GPL')
depends=()
backup=("etc/igmpproxy.conf")
source=("https://github.com/pali/igmpproxy/releases/download/$pkgver/igmpproxy-$pkgver.tar.gz"
	"igmpproxy.service")
sha256sums=('afa4b75a823b82f71ce99f33eae4e8136b906ae8a5ede5caaad93bac38cdae24'
            '9f2eed64578b8bfb3091594cb32b3cd29798ba148d790286429cc6c86b8d423f')

build() {
  cd "$srcdir"/$pkgname-$pkgver
  ./configure --prefix=/usr --sysconfdir=/etc --sbindir=/usr/bin
  make
}

package() {
  cd "$srcdir"/$pkgname-$pkgver
  make DESTDIR="$pkgdir" install
  install -Dm644 "$srcdir"/$pkgname.service "$pkgdir"/usr/lib/systemd/system/$pkgname.service
}
